﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace demo9
{
    class Npc
    {
        private string name;

        public string Name { get => name; set => name = value; }

        public void NpcName() 
        {
            Console.WriteLine("请选择对方角色：1、刘备2、孙权 3、曹操");
            int enemy = int.Parse(Console.ReadLine());

            switch (enemy)
            {
                case 1:
                    name = "刘备";
                    break;
                case 2:
                    name = "孙权";
                    break;
                case 3:
                    name = "曹操";
                 break;
            }
            Console.WriteLine("我是{0}，不落青云，不斩无名，问君其名:",name);
        }
    }
}
